<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ include file="./nav.jsp" %>
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <form>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="请输入搜索关键字" style="width: 90%;float: left;margin-bottom: 20px" id="searchNote">
                </div>
                <button type="button" class="btn btn-info" style="width:10%;float:left;margin-bottom: 20px" onclick="search()">
                    search
                </button>
            </form>

                <c:forEach items="${types.tags}" var="tag">
                    <div class="row">
                    <div class="tags-border">
                        <h2 style="margin-left: 10px;">
                             ${tag.tagsName}
                        </h2>
                    </div>
                    <c:forEach items="${tag.typeSends}" var="type">
                    <div class="col-md-3">

                        <a href="${pageContext.request.contextPath}/api/note/index?typeid=${type.typeId}" class="thumbnail">
                            <c:if test="type.typeIcon!=null">
                                <img src="/${type.typeIcon}" alt="...">
                            </c:if>
                            <div class="tag-model">

                                <div class="type-model">
                                        ${type.typeName.toUpperCase().charAt(0)}
                                </div>
                                <div class="type-name">${type.typeName}</div>
                            </div>

                        </a>
                    </div>
                    </c:forEach>
                    </div>
                </c:forEach>


        </div>
    </div>
</div>
<script type="text/javascript">
    function search() {
        var search = $("#searchNote").val();
        location.href="/api/note/note/select?page=1&select="+ encodeURI(search)
    }
</script>
</body>
</html>
